/*
package com.manger.utils;

import com.aspose.pdf.Document;
import com.aspose.pdf.devices.JpegDevice;
import com.aspose.pdf.devices.Resolution;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class PdfUtils {

    private static String licenseStr =
            "<License>\n" +
                    "  <Data>\n" +
                    "    <Products>\n" +
                    "      <Product>Aspose.Total for Java</Product>\n" +
                    "      <Product>Aspose.Words for Java</Product>\n" +
                    "      <Product>Aspose.Pdf for Java</Product>\n" +
                    "    </Products>\n" +
                    "    <EditionType>Enterprise</EditionType>\n" +
                    "    <SubscriptionExpiry>20991231</SubscriptionExpiry>\n" +
                    "    <LicenseExpiry>20991231</LicenseExpiry>\n" +
                    "    <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>\n" +
                    "  </Data>\n" +
                    "  <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>\n" +
                    "</License>";

    public static List<String> pdfToImages(String pdfPath,String targetDir) throws Exception {
        File file = new File(targetDir);
        if(!file.exists()){
            file.mkdirs();
        }
        List<String> filePathList = new ArrayList<>();
        Resolution resolution = new Resolution(300);
        JpegDevice imageDevice = new JpegDevice(resolution);
        Document document = new Document(pdfPath);
        for (int pageCount = 1; pageCount <= document.getPages().size(); pageCount++) {
            String tempFilePath = targetDir + "/" + UUID.randomUUID().toString().replaceAll("-","") + ".jpg";
            java.io.OutputStream imageStream = new java.io.FileOutputStream( tempFilePath);
            imageDevice.process(document.getPages().get_Item(pageCount), imageStream);
            imageStream.close();
            filePathList.add(tempFilePath);
        }
        return filePathList;
    }

    public static void main(String[] args) throws Exception{
       */
/* String filePth = "D:\\workSpace\\AutomaticCase\\format\\1756182702320\\好分期\\好分期\\28399576_af78593f8de20a7d4a096096199eceb2_杨明\\loanID_28399576_被告身份证.pdf";
        String targetDir = "C:\\Users\\liuhj\\Desktop\\test";
        PdfUtils.pdfToImages(filePth,targetDir);*//*

    }
}
*/
